//
//  LoginApi.swift
//  APP
//
//  Created by Rdxer on 2017/12/7.
//  Copyright © 2017年 Rdxer. All rights reserved.
//

import Foundation
import FastComponent
import Moya

public enum TokenApi {
    case Token
}

extension TokenApi:TargetType{
    public var baseURL: URL {
        return try! ServerConfig.baseURLString.asURL()
    }
    
    public var path: String {
        switch self {
        case .Token:
            return "access/token"
        }
    }
    
    public var method: Moya.Method {
        return .get
    }
    
    public var sampleData: Data {
        return "".data(using: .utf8)!
    }
    
    public var task: Task {
        return .requestParameters(parameters: parameters!, encoding: URLEncoding.default)
    }
    
    public var headers: [String : String]? {
        return nil
    }
    
    public var parameters: [String: Any]? {
        return [
            "appid":"aph",
            "secret":"aph"
        ]
    }
    
    
}



